#!/usr/bin/env python

import sys, os
sys.path.append(os.getcwd() + os.sep + 'lib')
from tiddlywiki import TiddlyWiki

def usage():
	print 'usage: untwee source'
	
	
def main (argv):
	if len(argv) == 0:
		usage()
		sys.exit(2)

	file = open(argv[0])
	tw = TiddlyWiki()
	tw.addHtml(file.read())
	print tw.toTwee()
	

if __name__ == '__main__':
	main(sys.argv[1:])
